<div class="panel-body">
	<div class="tab-pane active" id="profile">
		<form id="pw" action="/account/newPsw" method="post" class="form-horizontal">
				<div class="form-group">
					<label class="control-label col-lg-3" for="password">当前密码</label>
					<div class="col-lg-4">
						<input type="password" class="form-control" name="oldPassword" maxlength="20" placeholder="请输入当前密码" required>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-lg-3" for="password">新密码</label>
					<div class="col-lg-4">
						<input type="password" class="form-control" id="password" name="password" placeholder="请输入新密码" minlength="6" maxlength="18" required>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-lg-3" for="password2">确认密码</label>
					<div class="col-lg-4">
						<input type="password" class="form-control" name="password2" data-required="" placeholder="请再输入一遍新密码" minlength="6" maxlength="18" data-conditional="confirm" data-describedby="message" data-description="passwd" required>
					</div>
				</div>
				<div class="form-group">
					<div class="text-center">
					<button type="submit" class="btn btn-primary">提交</button>
					</div>
				</div><!-- /form-actions -->
			</form>
	</div>
</div>
<script type="text/javascript">
	$(document).ready(function() {
		$("#pw").ajaxForm({
			dataType: "json",
			success: function(ret) {
				// 业务层验证成功
				if(ret.isOk) {
					layer.alert(ret.msg, {icon: 6});
					//跳转到文章详情
					//location.href = "/community/article/"+ret.articleId;
					return ;
				}
				// 业务层验证失败
				else if (ret.isFail) {
					layer.alert(ret.msg);
					return ;
				}
			}
			, error: function(ret) { }              // ret.status != 200 时回调
			, complete: function(ret) { }       // 无论是 success 还是 error，最终都会被回调
		});
	});
	</script>